#ifndef _DEFINES_H_
#define _DEFINES_H_

#define S_IREAD        0000400         /* read  permission, owner */
#define S_IWRITE       0000200         /* write permission, owner */

#define __INT_MAX__ 2147483647
# define M_2PI      (2 * M_PI)
# define SUBPIXEL      0.5f

#define MAX_FACE 20
#define NUM_CUBIC_FACE 6

#define COMPONENT_Y 0
#define COMPONENT_U 1
#define COMPONENT_V 2
#define MAX_NUM_COMPONENT 3

#define FACE_NO_FLIP  0
#define FACE_HOR_FLIP 1
#define FACE_VER_FLIP 2
#define FACE_FLIP_NUM 3

#define FALSE  0
#define TRUE  1

#define doublering 1 // 20161217 added by Chang Lin, Shanghai University
#define DOUBLERING_ANGLE 0.447832376f
//#define SINF_DOUBLERING_ANGLE 0.433012701f
#define COSF_DOUBLERING_ANGLE 0.901387818f
#define TANF_DOUBLERING_ANGLE 0.480384461f

#define POLERECT 1 // POLERECT added by Yueming Wang, PKUSZ
#define ASC 1      // POLERECT added by Yueming Wang, PKUSZ
#define asyerp 1   // ASYERP added by Zhenyu Wang, PKUSZ

#define ISP 1
#if ISP==1
#define ISP3 1 // new layout of ISP
#define S_PAD_MAX 1
#endif

#define MTK_ORIENTATION 1 // hungchih.lin@mediatek.com

#define PKU_IMPROVE_ROTATION 0//lijiguo16@mails.ucas.ac.cn
#define PKU_IMPROVE_ROTATION_DEBUG 1

#define MTK_SS_CUBE 1   //mtk subsample cube, 20161229, leshi@mediatek.com
#if MTK_SS_CUBE==1
#define CURVE_FACTOR	6.0f // non-uniform factor
#define NON_UNIFORM_FORMULA(y) (y) = (float)pow((y),CURVE_FACTOR)
#define NON_UNIFORM_FORMULA_INV(y) (y) = (float)pow((y),1/CURVE_FACTOR)
#define FACE_LEFT	2
#define FACE_FRONT	3
#define FACE_RIGHT	0
#define FACE_REAR	1
#define FACE_TOP	4
#define FACE_BOTTOM	5

// #define MTKVP //mtk view port window sized spsnr

#endif


#endif